import {
	getComRequest
} from '@/utils/request'
export default {
	data() {
		return {
			caseInfo: {},
			caseId: ""
		}
	},
	onLoad: function(option) {
		this.caseId = option.id;
	},
	mounted() {
		this.getDetail();
	},
	methods: {
		// 获取详情数据
		getDetail() {
			const that = this;
			const url = "/api/case/" + this.caseId;
			getComRequest(url, {}).then((res) => {
				if (res.code == 200) {
					this.caseInfo = JSON.parse(JSON.stringify(res.data));
				} else {
					return this.$refs.uToast.show({
						message: res.message,
						type: 'error',
					})
				}
			}).catch(err => {})
		},
	}
}